package com.gson.token.tokenStorager;

/**
 * @Company 陕西识代运筹信息科技股份有限公司
 * @Discription
 * @Author houfengli
 * @CreateDate 2017/2/17 15:58
 * @Version 1.0
 */
public class TokenStoragerFactory {

    public static <T extends TokenStorager> T createTokenStorager(Class<T> clazz) {
        T product = null;
        try {
            product =  (T)Class.forName(clazz.getName()).newInstance();
        } catch (Exception e) { //异常处理
            e.printStackTrace();
        }
        return (T) product;
    }
}
